package com.loie.xcx.service.impl;

import com.loie.xcx.mapper.CustomerMapper;
import com.loie.xcx.model.bo.CustomerBO;
import com.loie.xcx.model.bo.PermissionBO;
import com.loie.xcx.model.dto.CustomerDTO;
import com.loie.xcx.service.CustomerService;
import lombok.AllArgsConstructor;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author zhl
 */
@Service
@AllArgsConstructor
@Transactional(rollbackFor = Exception.class)
public class CustomerServiceImpl implements CustomerService {
    private CustomerMapper customerMapper;

    @Override
    public List<CustomerBO> getCustomersByCorpName(String customerCorpName) {
        return customerMapper.getCustomersByCorpName(customerCorpName);
    }

    @Override
    public List<CustomerBO> getCustomersByPermissions(List<PermissionBO> list, CustomerDTO customerDTO) {
        return customerMapper.getCustomersByPermissions(list, customerDTO);
    }
}
